#ifndef DOCTORPROFILEWIDGET_H
#define DOCTORPROFILEWIDGET_H

#include <QWidget>
#include <QJsonObject>
#include "../../../Common/models.h"
#include "../../../Common/protocol.h"

namespace Ui {
class DoctorProfileWidget;
}

class DoctorProfileWidget : public QWidget {
    Q_OBJECT
    
public:
    explicit DoctorProfileWidget(const Doctor& doctor, QWidget *parent = nullptr);
    ~DoctorProfileWidget();
    
private slots:
    void on_saveButton_clicked();
    void on_refreshButton_clicked();
    void onMessageReceived(MessageType type, const QJsonObject& data);
    
private:
    void loadDoctorInfo();
    void loadDepartments();
    
    Ui::DoctorProfileWidget *ui;
    Doctor m_doctor;
};

#endif // DOCTORPROFILEWIDGET_H

